<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>My JSP 'statistics.jsp' starting page</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<%@ include file="/WEB-INF/jspf/taglibs.jspf"%>
		<%@ include file="/WEB-INF/jspf/statics.jspf"%>
	</head>
	<body>
		<%@include file="/WEB-INF/pages/common/header.jsp" %>
		<%@include file="/WEB-INF/pages/common/menu.jsp" %>
		<div id="rightqqqq" style="border-radius:5px;border:1px solidred;float:left;width:88%;height:10px;padding-left:4px;min-height:80%;overflow-y:auto; overflow-x:hidden; ">
					<div style="float: left; width: 100%; height: auto; min-height: 735px;">
						<div class="div-958" style="margin-top: 0px; width: 100%">
							<div style="width: 100%;" class="container clearfix w942">
								<div style="width: 100%" class="cont bl0">
									<div class="title clearfix">
										<h2>
											安全日志
										</h2>
									</div>
									<div class="content">
										<div class="dataTable-wrapper">
											<table id="dataTable"
												class="table table-bordered table-striped centered">
												<thead>
													<tr role="row">
														<th>
															操作
														</th>
														<th>
															时间
														</th>
														<th>
															ip地址
														</th>
													</tr>
												</thead>
												<tbody>
												</tbody>
											</table>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
	</body>
</html>
<script type="text/javascript" src="<%=basePath %>/js/jquery.plugins.js"></script>
<script type="text/javascript"
	src="<%=basePath%>js/jquery.dataTables.min.js"></script>
<script type="text/javascript"
	src="<%=basePath%>js/jquery.dataTables.init.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
	    $('#navigation').accordion({
				header: '.head',
				navigation1: true, 
				event: 'click',
				fillSpace: true,
				active:2,
				animated: 'bounceslide'
		});
		$("a[class='actived']").removeAttr("class");
		$("#safeLog").attr("class", "actived");
        search();
    })
    function search() {
        $("#dataTable").dataTables({
            "sAjaxSource": "account/user_logs",
            "fnServerData": function (sSource, aoData, fnCallback) {
                $.post(sSource, function (json) {
                    fnCallback(json.data);
                }, "json");
            },
            "aoColumns": [
                {
                    "mDataProp": function (aData, type, val) {
                        switch (aData.type) {
                            case 1:
                                val = "<span style='color: balck'>登陆</span>";
                                break;
                            case 2:
                                val = "<span style='color: balck'>修改密码</span>";
                                break;
                            case 3:
                                val = "<span style='color: balck'>安全设置</span>";
                                break;
                        }
                        return val;
                    }, "sName": "type", "bSortable": false
                },
                {
                    "sName": "add_time", "mDataProp": "addTimeStr", "bSortable": false
                },
                {
                    "sName": "ip", "mDataProp": "ip", "bSortable": false
                }
            ]
        });
        $(".bottom").remove();
    }
</script>